package org.jivesoftware.smack.sasl;

import java.io.IOException;
import org.apache.harmony.javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.SASLAuthentication;

public class SASLAnonymous extends SASLMechanism
{
  public SASLAnonymous(SASLAuthentication paramSASLAuthentication)
  {
    super(paramSASLAuthentication);
  }

  protected void authenticate()
    throws IOException
  {
    getSASLAuthentication().send(new SASLMechanism.AuthMechanism(this, getName(), null));
  }

  public void authenticate(String paramString1, String paramString2, String paramString3)
    throws IOException
  {
    authenticate();
  }

  public void authenticate(String paramString1, String paramString2, CallbackHandler paramCallbackHandler)
    throws IOException
  {
    authenticate();
  }

  public void challengeReceived(String paramString)
    throws IOException
  {
    getSASLAuthentication().send(new SASLMechanism.Response(this));
  }

  protected String getName()
  {
    return "ANONYMOUS";
  }
}